{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "48b78c96",
   "metadata": {},
   "source": [
    "##### **** These pip installs need to be adapted to use the appropriate release level. Alternatively, The venv running the jupyter lab could be pre-configured with a requirement file that includes the right release. Example for transform developers working from git clone:\n",
    "```\n",
    "make venv \n",
    "source venv/bin/activate \n",
    "pip install jupyterlab\n",
    "venv/bin/jupyter lab\n",
    "```"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "36454aed",
   "metadata": {},
   "outputs": [],
   "source": [
    "%%capture\n",
    "## This is here as a reference only\n",
    "# Users and application developers must use the right tag for the latest from pypi\n",
    "#%pip install 'data-prep-toolkit-transforms[ray,code_quality]'\n",
    "!pip install pandas\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "c1e700a7",
   "metadata": {},
   "source": [
    "##### ***** Import required classes and modules"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "82b36011",
   "metadata": {},
   "outputs": [],
   "source": [
    "from dpk_code_quality.ray.runtime import CodeQuality\n",
    "import pandas as pd"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "40b09f4a",
   "metadata": {},
   "source": [
    "##### ***** Setup runtime parameters for this transform and invoke the transform. The set of all possible parameters and their default values are [here](./README.md).\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "aa9c534d",
   "metadata": {},
   "outputs": [],
   "source": [
    "\n",
    "CodeQuality(input_folder= \"test-data/input\",\n",
    "            output_folder= \"output\",\n",
    "            run_locally = True,\n",
    "            ).transform()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "140ad7ef-bf22-424d-9bf0-cc836f3ddae9",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Load and display the output\n",
    "import pandas as pd\n",
    "df_output = pd.read_parquet(\"output/sample_1.parquet\")\n",
    "df_output.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "76436909-a763-4938-9ad4-f584d9802151",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.10"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
